package com.tonann.app.service;

import com.tonann.app.domain.AppSensorRecord;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 运行记录Service接口
 *
 * @author tonann
 * @date 2022-10-21
 */
public interface IAppSensorRecordService {
    /**
     * 查询运行记录
     *
     * @param recordId 运行记录主键
     * @return 运行记录
     */
    public AppSensorRecord selectAppSensorRecordByRecordId(Long recordId);

    /**
     * 查询运行记录列表
     *
     * @param appSensorRecord 运行记录
     * @return 运行记录集合
     */
    public List<AppSensorRecord> selectAppSensorRecordList(AppSensorRecord appSensorRecord);

    /**
     * 新增运行记录
     *
     * @param appSensorRecord 运行记录
     * @return 结果
     */
    public int insertAppSensorRecord(AppSensorRecord appSensorRecord);

    /**
     * 修改运行记录
     *
     * @param appSensorRecord 运行记录
     * @return 结果
     */
    public int updateAppSensorRecord(AppSensorRecord appSensorRecord);

    /**
     * 批量删除运行记录
     *
     * @param recordIds 需要删除的运行记录主键集合
     * @return 结果
     */
    public int deleteAppSensorRecordByRecordIds(Long[] recordIds);

    /**
     * 删除运行记录信息
     *
     * @param recordId 运行记录主键
     * @return 结果
     */
    public int deleteAppSensorRecordByRecordId(Long recordId);

    List<AppSensorRecord> selectAppSensorRecordPureList(AppSensorRecord appSensorRecord);

    AppSensorRecord selectAppSensorRecordBySensorId(Long sensorId);

    AppSensorRecord selectPreNoZeroAppSensorRecordByRecordId(Long recordId,Long sensorId);

    AppSensorRecord selectPreNoZeroAppSensorRecordByTime(LocalDateTime createTime, Long sensorId);

    void deleteAppSensorRecordBefore30Day();
}
